﻿<%@ Page Language="VB" MasterPageFile="~/MainLayout.master" AutoEventWireup="false" CodeFile="DocProposal.aspx.vb" Inherits="DocProposal" title="Untitled Page" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <h1>
       Proposal</h1>
    <hr />
    <asp:Label ID="lblStaffUID" runat="server" Visible="false" />
    <asp:Label ID="lblStaffType" runat="server" Visible="false" />
    <asp:Label ID="lblDocId" runat="server" Visible="false" />
    <div runat="server" id="divError" class="msg-box-error" visible="false" EnableViewState="false">
        <span class="title">
            <asp:Label ID="lblMsgError" runat="server" EnableViewState="false" /></span>
    </div>
    <div runat="server" id="divSuccessful" class="msg-box-success" visible="false" EnableViewState="false">
        <span class="title">
            <asp:Label ID="lblMsgSuccessful" runat="server" EnableViewState="false" /></span>
    </div>
    <p><%--Description of the page--%></p>
    <asp:Panel ID="pnlEntry" runat="server">
    <div class="form-container" id="divContentGeneral">
        <table width="100%"><tr><td class="General-info-title" style="width:150px;"><h3>General Information</h3></td><td><div class="General-info-title-line"></div></td></tr></table>
        <table class="form-table" cellpadding="5" cellspacing="5">
            <tr>
                <th scope="row" style="width: 250px">
                    Report Title :
                </th>
                <td>
                    <asp:TextBox ID="txtTitle" runat="server" Width="300px" TextMode="MultiLine" rows="2"  /><span style="color: Red">*</span>
                    <asp:RequiredFieldValidator runat="server" ID="rfvtxtTitle" ControlToValidate="txtTitle" ValidationGroup="Entry" ErrorMessage="Required" ForeColor="Red"
                    SetFocusOnError="true" Display="Dynamic" Width="180px" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    List Type :
                </th>
                <td>
                    <asp:DropDownList ID="ddlListType" runat="server" Width="300px">
                        <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                        <asp:ListItem Text="SR - Sales Residential" Value="SR" />
                        <asp:ListItem Text="SC - Sales Commercial" Value="SC" />
                        <asp:ListItem Text="SI - Sales Industrial" Value="SI" />
                        <asp:ListItem Text="SL - Sales Land" Value="SL" />
                        <asp:ListItem Text="RR - Rent Residential" Value="RR" />
                        <asp:ListItem Text="RC - Rent Commercial" Value="RC" />
                        <asp:ListItem Text="RI - Rent Industrial" Value="RI" />
                        <asp:ListItem Text="RL - Rent Land" Value="RL" />
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    To :
                </th>
                <td>
                    <asp:TextBox ID="txtTo" runat="server" Width="300px" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    Contact No :
                </th>
                <td>
                    <asp:TextBox ID="txtContact" runat="server" Width="300px" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    Address :
                </th>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server" Width="300px" TextMode="MultiLine" Rows="4" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    By Mail/Fax
                </th>
                <td>
                    <asp:DropDownList ID="ddlMailFax" runat="server" Width="300px">
                        <asp:ListItem Text="-SELECT-" Value="" Selected="True" />
                        <asp:ListItem Text="Mail" Value="Mail" />
                        <asp:ListItem Text="Fax" Value="Fax" />
                    </asp:DropDownList> 
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    REN :
                </th>
                <td>
                    <asp:TextBox ID="txtREN" runat="server" width="300px" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />                    
                     <%--REN Panel--%>
                     <asp:Panel ID="pnlREN" runat="server" CssClass="modalPopup" Style="display:none" Width="500px">
                     <table border="0" cellpadding="0" cellspacing="0" class="PopupContainer">
                        <tr>
                            <td style="width:30px; height:41px" background="images/style01/PopupHead-top-left.gif">
                            </td>
                            <td background="images/style01/PopupHead-top-middle.gif" valign="bottom">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupHeader">
                                <thead>
                                    <tr>
                                        <td align="center" style="text-align:center" height="30"><asp:Label ID="lblRENTitle" runat="server" Text="REN" /></td>
                                        <td align="right" style="text-align:right"><asp:ImageButton ID="imgButRENClose" runat="server" AlternateText="Close" Height="20px" Width="20px" ImageUrl="~/images/style01/Btn-Close.png"  /> </td>
                                    </tr>
                                 </thead>
                                </table>    
                            </td>
                            <td style="width:30px; height:41px" background="images/style01/PopupHead-top-right.gif">
                            </td>
                        </tr>
                        <tr>
                        <td width="30" height="30" background="images/style01/Popup-PropertyType-left.gif">&nbsp;</td>
                        <td  background="images/style01/Popup-PropertyType-middle.gif" style="background-color:white;">&nbsp;</td>
                        <td background="images/style01/Popup-PropertyType-right.gif">&nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width:30px" background="images/style01/Popup-left-middle.gif"></td>
                            <td  bgcolor="#FFFFFF" >
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupDataDisplay" style="height:100%; background-color:#FFFFFF;" >
                                    <tr>
                                        <td >
                                        <div style="height:500px; overflow:auto;">
                                                <table width="100%" border="0"  >
                                                    <tr>
                                                        <td>
                                                            <strong>Name</strong>
                                                        </td>                                                       
                                                    </tr>
                                                    <asp:Repeater ID="repREN" runat="server">
                                                        <ItemTemplate>
                                                            <tr>
                                                                <td>
                                                                    <asp:LinkButton ID="lnkRepREN" runat="server" 
                                                                        CommandArgument='<%# DataBinder.Eval(Container,"ItemIndex") %>' 
                                                                        CommandName="SelectType" Text='<%#Container.DataItem("Name").ToString%>' />
                                                                </td>
                                                            </tr>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </table>
                                            </div>                        
                                        </td>
                                    </tr>
                                </table>
                            </td>            
                            <td style="width:30px" background="images/style01/Popup-right-middle.gif"></td>
                        </tr>
                        <tr>
                            <td style="width:30px; height:55px" background="images/style01/Popup-bottom-left.gif"></td>
                            <td style="text-align:right" background="images/style01/Popup-bottom-middle.gif">&nbsp;</td>
                            <td style="width:30px; height:55px" background="images/style01/Popup-bottom-right.gif"></td>
                        </tr>
                    </table>

                    </asp:Panel>
                    <asp:Button ID="btnRENHiddenNew" runat="server" style="display:none" />
                    <cc1:ModalPopupExtender ID="mpeRENEntry" runat="server" BackgroundCssClass="modalBackground" DropShadow="false" PopupControlID="pnlREN" TargetControlID="btnRENHiddenNew" EnableViewState="True" />
                    <%--End REN Panel--%>     
                    <asp:ImageButton ID="btnSearchREN" runat="server" Text="Search" ImageUrl="~/images/style01/Btn-manify.png" />
                </td>
            </tr>           
            <tr>
                <th scope="row" style="width: 200px">
                    Attn :
                </th>
                <td>
                    <asp:TextBox ID="txtAttn" runat="server" Width="300px" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 200px">
                    Date :
                </th>
                <td>
                    <asp:TextBox ID="txtDate" runat="server" width="300px" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />
                    &nbsp;&nbsp;<asp:ImageButton runat="Server" ID="imgDateCal" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
                    <cc1:CalendarExtender ID="ceDate" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtDate" PopupButtonID="imgDateCal" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 200px">
                    Other :
                </th>
                <td>
                    Reference is made to the 
                    <asp:DropDownList ID="ddlType" runat="server">
                        <asp:ListItem text="teleconversation" Value="teleconversation" />
                        <asp:ListItem Text="viewing" Value="viewing" />
                        <asp:ListItem Text="meeting" value="meeting" />    
                    </asp:DropDownList> between 
                    <asp:DropDownList ID="ddlyour" runat="server">
                        <asp:ListItem Text="your goodself" Value="your goodself" />
                        <asp:Listitem Text="your" Value="your" />
                    </asp:DropDownList> <asp:TextBox ID="txtName" runat="server" Width="300px" /> and our <asp:TextBox ID="txtOurName" Width="300px" runat="server" /> on <asp:TextBox ID="txtOnDate" runat="server" onKeyPress="javascript: return false;" onPaste="javascript: return false;" />
                    <asp:ImageButton runat="Server" ID="ImageButton1" AlternateText="Click to show calendar" ImageUrl="~/images/style01/Btn-calendar.png" />
                    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd-MMM-yyyy" TargetControlID="txtDate" PopupButtonID="imgDateCal" />
                </td>
            </tr>   
        </table>
        <br />
    <div class="form-container" id="divContentContact">
        <table style="width:100%;" >
            <tr><td style="width:150px;"><div class="General-info-title"><h3>Property Information </h3></div></td>
            <td><div class="General-info-title-line"></div></td>
            </tr>
        </table>
        <table cellpadding="5" cellspacing="5" class="form-table">
            <tr>
                <th scope="row" style="width: 250px">
                    Property :
                </th>
                <td class="style1">
                    <asp:TextBox ID="txtPropertyAddress" runat="server" width="300px" onKeyPress="javascript: return false;" onPaste="javascript: return false;" /> 
                    <asp:Label ID="lblPropertyId" runat="server" Visible="false" /><asp:Label ID="lblLocation" runat="server" Visible="false" />
                 <%--Property Panel--%>
                     <asp:Panel ID="pnlProperty" runat="server" CssClass="modalPopup" Style="display:none" Width="500px">
                     <table border="0" cellpadding="0" cellspacing="0" class="PopupContainer">
                        <tr>
                            <td style="width:30px; height:41px" background="images/style01/PopupHead-top-left.gif">
                            </td>
                            <td background="images/style01/PopupHead-top-middle.gif" valign="bottom">
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupHeader">
                                <thead>
                                    <tr>
                                        <td align="center" style="text-align:center" height="30"><asp:Label ID="lblPropertyTitle" runat="server" Text="Property Search" /></td>
                                        <td align="right" style="text-align:right"><asp:ImageButton ID="imgButPropertyClose" runat="server" AlternateText="Close" Height="20px" Width="20px" ImageUrl="~/images/style01/Btn-Close.png"  /> </td>
                                    </tr>
                                 </thead>
                                </table>    
                            </td>
                            <td style="width:30px; height:41px" background="images/style01/PopupHead-top-right.gif">
                            </td>
                        </tr>
                        <tr>
                        <td width="30" height="30" background="images/style01/Popup-PropertyType-left.gif">&nbsp;</td>
                        <td  background="images/style01/Popup-PropertyType-middle.gif" style="background-color:white;">&nbsp;</td>
                        <td background="images/style01/Popup-PropertyType-right.gif">&nbsp;</td>
                        </tr>
                        <tr>
                            <td style="width:30px" background="images/style01/Popup-left-middle.gif"></td>
                            <td  bgcolor="#FFFFFF" >
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="PopupDataDisplay" style="height:100%; background-color:#FFFFFF;" >
                                    <tr>
                                        <td >
                                        <div style="height:500px; overflow:auto;">
                                                <table width="100%" border="0">
                                                    <tr>
                                                        <td>Location</td>
                                                        <td><asp:TextBox ID="txtpopupLocation" runat="server" /></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Road</td>
                                                        <td><asp:TextBox ID="txtpopupRoad" runat="server" /></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Unit Number</td>
                                                        <td><asp:TextBox ID="txtpopupUnitNumber" runat="server" /></td>
                                                    </tr>
                                                    <tr>
                                                        <td colspan="2"><asp:Button ID="btnpopupSearch" runat="server" Text="Search" CssClass="search-btn" /></td>
                                                    </tr>
                                                </table>
                                                <table width="100%" border="0"  >
                                                    <tr>
                                                        <td>
                                                            <strong>Address</strong>
                                                        </td>                                                       
                                                    </tr>
                                                    <asp:Repeater ID="repProperty" runat="server">
                                                        <ItemTemplate>
                                                            <tr>
                                                                <td>
                                                                    <asp:LinkButton ID="lnkRepAddress" runat="server" 
                                                                        CommandArgument='<%# DataBinder.Eval(Container,"ItemIndex") %>' 
                                                                        CommandName="SelectType" Text='<%#Container.DataItem("Address").ToString%>' />
                                                                    <asp:Label ID="lblRepPropertyId" runat="server" Text='<%#Container.DataItem("PropertyId").ToString%>' Visible="false" />
                                                                    <asp:Label ID="lblRepLocation" runat="server" Text='<%#Container.DataItem("Location").ToString%>' Visible="false" />
                                                                </td>
                                                            </tr>
                                                        </ItemTemplate>
                                                    </asp:Repeater>
                                                </table>
                                            </div>                        
                                        </td>
                                    </tr>
                                </table>
                            </td>            
                            <td style="width:30px" background="images/style01/Popup-right-middle.gif"></td>
                        </tr>
                        <tr>
                            <td style="width:30px; height:55px" background="images/style01/Popup-bottom-left.gif"></td>
                            <td style="text-align:right" background="images/style01/Popup-bottom-middle.gif">&nbsp;</td>
                            <td style="width:30px; height:55px" background="images/style01/Popup-bottom-right.gif"></td>
                        </tr>
                    </table>

                    </asp:Panel>
                    <asp:Button ID="btnPropertyHiddenNew" runat="server" style="display:none" />
                    <cc1:ModalPopupExtender ID="mpePropertyEntry" runat="server" BackgroundCssClass="modalBackground" DropShadow="false" PopupControlID="pnlProperty" TargetControlID="btnPropertyHiddenNew" EnableViewState="True" />
                    <%--End Property Panel--%>     
                    <asp:ImageButton ID="btnSearchProperty" runat="server" Text="Search" ImageUrl="~/images/style01/Btn-manify.png" />
                </td>
            </tr>
            <tr>
                <th scope="row" style="width: 250px">
                    Remarks :
                </th>
                <td class="style1">
                    <asp:TextBox ID="txtRemarks" runat="server" Width="300px" TextMode="MultiLine" Rows="4" />
                </td>
            </tr>
            <tr>
                <td colspan="2"><asp:Button ID="btnAddMore" runat="server" Text="Add More" ValidationGroup="Property" /></td>
            </tr>
            <tr>
                <td colspan="2">
                    <table>
                        <tr>
                            <th>Address</th>
                            <th>Location</th>
                            <th>Selling Price/Rental</th>
                            <th>Tenure</th>
                            <th>Type</th>
                            <th>LA</th>
                            <th>BU</th>
                            <th>Remarks</th>
                            <th></th>                            
                        </tr>
                        <asp:Repeater ID="repPropertyAdded" runat="server">
                            <ItemTemplate>
                             <tr>
                                <td width="160px">
                                    <asp:Label ID="lblhidRepDocPPId" runat="server" Visible="false" Text='<%#Container.dataitem("DocPPId").tostring %>' />
                                    <asp:Label ID="lblhidRepStatus" runat="server" Visible="false" Text='<%#Container.dataitem("Status").tostring %>' />
                                    <asp:Label ID="lblhidRepVisible" runat="server" Visible="false" Text='<%#Container.dataitem("Visible").tostring %>' />
                                    <asp:Label ID="lbtRepAddress" runat="server" Text='<%#Container.dataitem("Address").tostring %>' />                                    
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepLocation" runat="server" Text='<%#Container.dataitem("Location").tostring %>' />                                    
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepPrice" runat="server" Text='<%#Bind("Price", "{0:#,##0.00}")%>' />                                   
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepTenure" runat="server" Text='<%#Container.dataitem("Tenure").tostring %>' />                                    
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepType" runat="server" Text='<%#Container.dataitem("Type").tostring %>' />
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepLA" runat="server" Text='<%#Bind("LA", "{0:#,##0.00}") %>' />                                    
                                </td>
                                <td width="160px">
                                    <asp:Label ID="lbtRepBU" runat="server" Text='<%#Bind("BU", "{0:#,##0.00}") %>' />
                                </td>                               
                                <td width="160px">
                                    <asp:Label ID="lbtRepRemarks" runat="server" Text='<%#Container.dataitem("Remarks").tostring %>' />
                                </td>                               
                                <td>
                                    <asp:Button ID="btnMinus" runat="server" Text="-" CommandName="Minus" CommandArgument='<%# DataBinder.Eval(Container,"ItemIndex") %>' />
                                </td>
                            </tr>
                            </ItemTemplate>
                        </asp:Repeater>                        
                    </table>
                </td>
            </tr>               
        </table>
        <br />
        <div class=" form-entry-title" style="line-height:15px; margin-bottom:0px; margin-top:15px;"><span style="color: Red; font-size:10px;"><asp:Label id="lblUpdated" runat="Server" /></span></div>
    <div class="Confirmation-Container">
        <div class="Confirmation-Container">
        <table width="100%" style="margin-left:0px;">
                        <tr>
                            <td style="width: 620px"><div class="General-info-title-line"></div></td>
                            <td style="width:350px;">                                 
                                &nbsp;<asp:Button ID="btnBack" runat="server" Text="Back"  CssClass="search-btn" Width="60px"  />
                                &nbsp;<asp:Button ID="btnPreview" runat="server" Text="Preview"  CssClass="search-btn" Width="60px"  />
                                &nbsp;<asp:Button ID="BtnSave" runat="server" Text="Save" ValidationGroup="Entry" CssClass="search-btn" Width="80px"  />                            
                                 &nbsp;<asp:Button ID="btnDownload" runat="server" Text="Download" ValidationGroup="Entry" CssClass="search-btn" Width="80px"  />
                                <cc1:ConfirmButtonExtender ID="CBEBack" runat="server" TargetControlID="btnBack" />
                                <cc1:ConfirmButtonExtender ID="CBEDownload" runat="server" TargetControlID="btnDownload" />
                            </td>
                            <td><div class="General-info-title-line"></div></td>
                        </tr>
                    </table>
                    <div class=" form-entry-title" style="line-height:15px; margin-bottom:0px; margin-top:15px;"><span style="color: Red; font-size:10px;">*Required fields</span></div>
    </div>
    </div> 
    </div>
    </div>
    </asp:Panel>
    <asp:Panel ID="pnlPreview" runat="server">
    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
        Font-Size="8pt" ShowToolBar="false" width="100%" Height="1000px">
        <LocalReport ReportPath="report/rptDocProposal.rdlc">
            <%--<DataSources>
                <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" 
                    Name="dsMonthlyReport_AW_MonthlyReport" />
            </DataSources>--%>
        </LocalReport>
    </rsweb:ReportViewer>
    <%--<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetData" TypeName="dsMonthlyReportTableAdapters.">
    </asp:ObjectDataSource>--%>
    <asp:Button ID="btnBackEntry" runat="server" text="Back" CssClass="search-btn" Width="60px" />
    </asp:Panel>
</asp:Content>
